<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button type="button" onclick="Get();">获取</button>
		<div id="div"></div>
	</body>
	<script type="text/javascript">
		function Get(){
					var TimeAjax = new XMLHttpRequest();
					var url = '?sid=28654780';
					TimeAjax.open('GET','https://api.apiopen.top/getSingleJoke'+url);
					TimeAjax.send();
					TimeAjax.onreadystatechange = function(){
						if(TimeAjax.status==200 && TimeAjax.readyState==4){
							document.getElementById('div').innerText=TimeAjax.responseText;
							var obj = JSON.parse(TimeAjax.responseText);
							console.log(obj);
						}
					}
				}
	</script>
</html>
